package com.teemo.test;

import oshi.SystemInfo;
import oshi.hardware.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author Teemo
 */
public class OshiDemo {
    public static void main(String[] args) {

        BigDecimal GbDw = new BigDecimal(1024 * 1024 * 1024);
        BigDecimal HzDw = new BigDecimal(1000 * 1000);


        SystemInfo systemInfo = new SystemInfo();
        HardwareAbstractionLayer hardware = systemInfo.getHardware();
//        CentralProcessor processor = hardware.getProcessor();
//        CentralProcessor.ProcessorIdentifier processorIdentifier = processor.getProcessorIdentifier();
//        String name = processorIdentifier.getName();
//        System.out.println(name);

//        Sensors sensors = hardware.getSensors();
//        List<SensorFanInfo> sensorFanInfos = sensors.getMotherboardFans();
//        for (SensorFanInfo sensorFanInfo : sensorFanInfos) {
//            System.out.println(sensorFanInfo);
//        }
//        double cpuTemperature = sensors.getCpuTemperature();
//        System.out.println(cpuTemperature);
//
//        List<GraphicsCard> graphicsCards = hardware.getGraphicsCards();
//        for (GraphicsCard graphicsCard : graphicsCards) {
//            long vRam = graphicsCard.getVRam();
//        }
        Sensors sensors = hardware.getSensors();
        List<GpuInfo> gpuInfos = sensors.getGpuInfos();
        System.out.println(gpuInfos);
    }
}
